package org.ciallo.easytokencore.config;

import org.ciallo.easytokencore.interceptor.EasyAnnotationInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description: Easy-Token 注解拦截器配置类
 * @Author: Jukomu
 * @Package: org.ciallo.easytokencore.config
 * @Project: easy-token-demo
 * @name: AnnotationInterceptorConfig
 * @Date: 2025-05-12
 * @Filename: AnnotationInterceptorConfig
 */
@Configuration
public class AnnotationInterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new EasyAnnotationInterceptor())
                .addPathPatterns("/**")
                .order(1);
    }
}
